feat(sidebar): use PR-state icon as the workspace icon#41
Merged
Conversation
When a worktree workspace has a pull request, the row's leading icon
turns into the PR-state-colored icon (open=green, merged=purple,
closed=red, draft=gray) and becomes a clickable button that opens the
PR URL on GitHub. Hovering the icon surfaces a tooltip with the PR
number ("Open PR #39 — click to open"), so the previous trailing
indicator — colored pill + duplicate PR number — is removed entirely.
Primary/remote/openflow workspaces keep their existing icons; non-PR
worktrees still fall back to the plain branch icon.
The agent-state status dots (working amber/pulsing, review green,
permission red/pulsing) are unchanged — StatusIndicator is positioned
absolutely as a sibling of the icon in the row's icon column, so the
dots still overlay the top-right corner regardless of whether the
leading glyph is the branch icon or the new PR-state icon.
Also reconciles package-lock.json with the 0.6.1 version bump in
package.json from a56074d (npm install side effect).
# Conflicts: # src/components/layout/sidebar-workspace-row.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Open PR #39 — click to open).#39) is removed entirely — the leading icon + tooltip already carry the same signal, so the right-side number was redundant noise.The agent-state status dots (working amber/pulsing, review green, permission red/pulsing) are structurally unchanged.
StatusIndicatoris rendered as an absolute-positioned sibling of the icon in the row's icon column, so the dots still overlay the top-right corner regardless of whether the leading glyph is the branch icon or the new PR-state icon. An inline comment locks in that invariant.Test plan
npm run check— TypeScript cleannpm run test— 1718/1718 passing, including 6 new tests insidebar-workspace.test.tsx:pr_state: "OPEN""MERGED""CLOSED"openUrland does NOT activate the workspace (stopPropagation works)#39is gone, and there's exactly one PR button on the rowFollow-up
Notes
WorkspaceSnapshottype changes. Samepr_state/pr_number/pr_urlfields, samerefresh_workspace_prflow, sameopenUrlclick behavior — just bound to the leading icon instead of the trailing pill.package-lock.jsonis included becausenpm installreconciled it with the 0.6.1 version bump from a56074d.